import { getNewAPI } from '@/apis/home'
import { reactive,onMounted } from 'vue'
import { defineStore } from 'pinia'

export const useNewStore = defineStore('new',() => {
    const newList = reactive([])

    const getNewList = async () => {
            const {result} = await getNewAPI()
            Object.assign(newList,result)
    }

    onMounted(() => {
        getNewList()
    })

    return {newList}
})